﻿using System;
using Moe.ECamel.Common.Entities;

namespace Moe.ECamel.Common.Contracts
{
	public class TransferCopyResponse
	{
		private readonly bool _successful;

		private readonly String _itemCatalogNumber;
		private readonly String _itemTitle;

		private readonly int _sourceLibraryId;
		private readonly String _sourceLibraryName;

		private readonly int _targetLibraryId;
		private readonly String _targetLibraryName;

		public TransferCopyResponse()
		{
			this._successful = false;
		}
		public TransferCopyResponse(Item item, Library sourceLibrary, Library targetLibrary)
		{
			this._successful = true;
			this._itemCatalogNumber = item.CatalogNumber;
			this._itemTitle = item.Title;
			this._sourceLibraryId = sourceLibrary.LibraryId;
			this._sourceLibraryName = sourceLibrary.LibraryName;
			this._targetLibraryId = targetLibrary.LibraryId;
			this._targetLibraryName = targetLibrary.LibraryName;
		}

		public bool IsSuccessful
		{
			get { return _successful; }
		}

		public string ItemCatalogNumber
		{
			get { return _itemCatalogNumber; }
		}

		public string ItemTitle
		{
			get { return _itemTitle; }
		}

		public int SourceLibraryId
		{
			get { return _sourceLibraryId; }
		}

		public string SourceLibraryName
		{
			get { return _sourceLibraryName; }
		}

		public int TargetLibraryId
		{
			get { return _targetLibraryId; }
		}

		public string TargetLibraryName
		{
			get { return _targetLibraryName; }
		}
	}
}
